package com.luom.fsp.job.once;

import com.luom.fsp.constant.RedisConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

@Component
@Slf4j
public class DashboardDataOnce {

    @Resource
    private StringRedisTemplate stringRedisTemplate;

    @PostConstruct
    public void init() {
        stringRedisTemplate.delete(RedisConstant.DASHBOARD_KEY);
        log.info("仪表盘已删除旧数据");
    }
}
